<?php

# Multiply

$a = 2;$b = 5;$out = 0;

for ($i = 1; $i <= $b ; $i++) {
  $out = $out+$a;
}
printf("%02d * %02d = %02d \n\n",$a,$b,$out);
/******************************/
# Substract
/******************************/
$a = 12;
$b = 5;

$out = $a + (~$b + 1);
printf("%02d - %02d = %02d \n\n",$a,$b,$out);

/******************************/
# Divide

$a1 = $a = 2;
$b = 2;
$out = 0;

while($a>=$b)
{
  $a = $a - $b;
  $out++;
}

printf("%02d / %02d = %02d \n\n",$a1,$b,$out);
